Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; calc offset value, current work offset and g92/52 offset
- #<workoffset> = [#[5203 + #5220 * 20] + #5213 * #5210]
- o200 if [#<_pv_ts_meas_length>]
- o210 if [#<automode>]
- ; this is an auto mode call
- #<ztravel> = [-#<_ini[TOOLSENSOR]MAXPROBE>]
- o210 else
- ; manual mode
- o215 if [#<_pv_got_z>]
- #<ztravel> = #<_pv_z>
- o215 else
- #<ztravel> = #<_pv_ts_probe_overtravel>
- o215 endif
- o210 endif
- o<_pm_ts_zprobe> call [#<ztravel>] [#<_pv_ts_ref_dia>] [#<_ini[TOOLSENSOR]XOFF>] [#<_ini[TOOLSENSOR]YOFF>] [#<tool_orient>] [#<tool_angle>]
- (print, _pm_ts_toolprobe z probe completed)
- o<_pm_check_error> call [#<pval>]
- #<raw_result> = #[#<_pma_zpos>]
- o220 if [#<_tool_offset>]
- #<ztooloffset> = #5403
- o220 else
- #<ztooloffset> = 0
- o220 endif
- #<touch_result> = [#<raw_result> + #<workoffset>]
- (print, raw z: #<raw_result> workoffset: #<workoffset> ztooloffset: #<ztooloffset> touch_result: #<touch_result>)
- o230 if [#<calmode>]
- #<th> = [#<touch_result> + #<ztooloffset> - #5403]
- #[#<_pma_cal_ts_height>] = #<th>
- #[#<_pma_cal_ts_zvalid>] = 1
- (print, Cal tool setter height: #<th>)
- o230 else
- #<setterheight> = #[#<_pma_cal_ts_height>]
- o250 if [#<_pv_ts_exp_num>]
- G10.1 P[#<_pv_ts_exp_num>]
- #<experience_value> = #<_read_tool_table_diameter>
- o250 else
- #<experience_value> = 0
- o250 endif
- #<tool_offset> = [#<touch_result> + #<ztooloffset> - #<setterheight> + #<experience_value>]
- (print, setterheight: #<setterheight> tool_offset: #<tool_offset>)
- ; apply the offset if we are not using t0
- o255 if [#<_current_tool>]
- G10 L1 P[#<_current_tool>] Z[#<tool_offset>]
- o255 endif
- o230 endif
- o200 else
- ; not probing length so we need to move to the start location above the toolsetter
- #<zdelta> = [#[#<_pma_cal_ts_height>] + #<workoffset> - #<_z> + #<_pv_ts_latch_distance>]
- o290 if [#<_tool_offset>]
- o290 else
- #<zdelta> = [#<zdelta> + #5403]
- o290 endif
- (print, zdelta: #<zdelta>)
- G91 G1 Z[#<zdelta>] F[#<_pmm_rapid_feedrate>]
- o200 endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement